<div class="febs-container">
    <div class="febs-body layui-fluid" id="febs-deptNew" lay-title="部门设置">
        <div class="febs-body-search">
            <form class="jhg-body layui-form layui-table-form" lay-filter="deptNew-table-form" id="deptNew-table-form">
                <div class="layui-card">
                    <div class="layui-card-body">
                        <div class="layui-form-item">
                            <div class="layui-inline"  th:classappend="${hasHeadCompanyRole } ? '' : 'febs-hide'">
                                <label class="layui-form-label layui-form-label-sm" style="width: auto !important;">公司名称</label>
                                <div class="layui-input-block" style="width: 280px;margin-left: 90px;">
                                    <select name="tenantSelect" id="tenantSelect">
                                        <option th:each="tenant:${tenantList}" th:value="${tenant.tenantId}"
                                                th:text="${tenant.tenantName}"></option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label layui-form-label-sm"
                                       style="width: auto !important;">机构名称</label>
                                <div class="layui-input-block" style="margin-left: 90px;">
                                    <input type="text" name="deptName" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <div id="query" class="layui-btn">
                                    <em class="layui-icon">&#xe615;</em> 查询
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
        <div class="febs-table-full">
            <table id="deptNewTable" lay-filter="deptNewTable" lay-data="{id: 'deptNewTable'}"></table>
        </div>
    </div>
</div>
<script type="text/html" id="deptNew-toolbar">
    <div lay-event="add" class="layui-btn layui-btn-sm" shiro:hasPermission="dept:add">
        <em class="layui-icon">&#xe654;</em> 新增
    </div>
</script>
<script type="text/html" id="deptNew-option">
    <button type="button" lay-event="add" class="layui-btn layui-btn-xs  layui-btn-primary layui-border-green" shiro:hasPermission="dept:add">
        <i class="layui-icon layui-icon-add-1"></i>
        新增
    </button>
    <button type="button" class="layui-btn layui-btn-xs layui-btn-primary layui-border-orange" lay-event="edit" shiro:hasPermission="dept:update">
        <i class="layui-icon layui-icon-edit"></i>
        编辑
    </button>
    <button type="button"  class="layui-btn layui-btn-xs layui-btn-primary layui-border-red" lay-event="del" shiro:hasPermission="dept:delete">
        <i class="layui-icon layui-icon-delete"></i>
        删除
    </button>
</script>
<script type="text/html" id="status-bar">
    <input type="checkbox" name="aStatus" value="{{d.status}}" lay-skin="switch" lay-text="启用|停用"
           lay-filter="status" lay-event=""  {{ d.status == '1' ? 'checked' : '' }} />
</script>
<script data-th-inline="javascript" >
    currentTenantId = [[${currentTenantId}]],
    hasHeadCompanyRole = [[${hasHeadCompanyRole}]];
</script>
<script th:src="@{/febs/js/system/dept/deptList.js}"></script>